<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        table{
            width: 400px;
            text-align: center;
        }
    </style>
</head>
<body>
<a href="/toAddCourse">添加记录</a>
<table border="1" cellpadding="0" cellspacing="0">
    <tr>
        <th>课程ID</th>
        <th>课程名称</th>
        <th>教师ID</th>
        <th>操作</th>
    </tr>
    <tr th:each="course:${courseList}">
        <td th:text="${course.courseId}"></td>
        <td th:text="${course.courseName}"></td>
        <td th:text="${course.teacherId}"></td>
        <td>
            <a th:href="'/deleteCourse?id='+${course.courseId}">删除</a>
            <a th:href="'/toEditCourse?id='+${course.courseId}">修改</a>
        </td>
    </tr>
</table>

</body>
</html>